package _2布局;

import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel	;

public class GridLayoutFrame extends JFrame {


	public GridLayoutFrame() {
	
		
		JPanel p1 = new JPanel();
		this.add(p1);
		// 1010 
		p1.setLayout(new GridLayout(10,10,5,5));
		
		for(int i=1;i<=100;i++)
		{
			JButton btn = new JButton(""+i);
			p1.add(btn);
		}
	}
	

}
